//
//  NSObject+kvoRuntime.m
//  BPTV
//
//  Created by baipeng on 2018/11/16.
//  Copyright © 2018年 Apple Inc. All rights reserved.
//

#import "NSObject+kvoRuntime.h"
#import "NSObject+HFSafe.h"
@implementation NSObject (kvoRuntime)

+ (void)load {
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        @autoreleasepool {
            [objc_getClass("self") swizzleMethod:@selector(removeObserver:forKeyPath:) withMethod:@selector(removeXQ:forKeyPath:) error:nil];
        };
    });
}
-(void)removeXQ:(NSObject *)observer forKeyPath:(NSString *)keyPath{
    @try {
        [self removeXQ:observer forKeyPath:keyPath];
    } @catch (NSException *exception) {

    }

}

@end
